project/urngd.git
13 months agoDeactivate _FORTIFY_SOURCE in jitterentropy-base.c master
Hauke Mehrtens [Mon, 30 Oct 2023 20:39:26 +0000 (21:39 +0100)]
Deactivate _FORTIFY_SOURCE in jitterentropy-base.c

This fixes compilation with glibc.

_FORTIFY_SOURCE only works with compiler optimizations activated.
We have to deactivate it when we set -O0.

This fixes the following error message with glibc:
 error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]

musl libc does not show an error message in this case, but has the same
internal problems.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
16 months agojitterentropy-rngd: update to the v1.2.0
Rafał Miłecki [Thu, 20 Jul 2023 09:12:17 +0000 (11:12 +0200)]
jitterentropy-rngd: update to the v1.2.0

74104b2 update copyright date
1b5f34b integrate library v3.0.0
8a43ce4 Fix permissions set by systemd unit file
f995407 force the kernel to reseed the ChaCha20 DRNG
4104015 force reseed after 10 minutes
9d61de7 jitterentropy-rngd.1: spelling
739bcba Add Dockerfile and docker-compose.yaml for easy deployment.
cc8c38c Harden systemd service

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years agoTag version 1.0.2 v1.0.2
Petr Štetiar [Tue, 21 Jan 2020 15:20:07 +0000 (16:20 +0100)]
Tag version 1.0.2

Lets tag version 1.0.2.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agoFix blocked entropy generation
Cristian Ciocaltea [Tue, 21 Jan 2020 14:43:24 +0000 (16:43 +0200)]
Fix blocked entropy generation

The OpenWrt Jitter RNG daemon is currently unable to continuously
provide entropy, except once on process startup.

This patch brings the following fixes:
- poll /dev/random for unblocking write operations, instead of read
- register the low entropy callback after uloop initialization, not
  before

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
[commit subject tweak, uloop_done cleanup]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoTag version 1.0.1 v1.0.1
Petr Štetiar [Thu, 10 Oct 2019 17:25:03 +0000 (19:25 +0200)]
Tag version 1.0.1

Lets tag version 1.0.1.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agojitterentropy-rngd: update to version v1.1.0 + clang compile fix
Petr Štetiar [Fri, 27 Sep 2019 20:46:29 +0000 (22:46 +0200)]
jitterentropy-rngd: update to version v1.1.0 + clang compile fix

 * avert crash during shutdown when the kernel sends a SIGALRM while the
   Jitter RNG is deallocated
 * Fix: unsafe signal handling by Gerald Lledo
 * import jitterentropy library 2.2.0 to make rngd fully SP800-90B compliant
 * include clang compile fix in order to use scan-build static checker
   used in GitLab CI pipeline

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoFix wrong types in format strings used in debug build
Petr Štetiar [Fri, 27 Sep 2019 20:46:10 +0000 (22:46 +0200)]
Fix wrong types in format strings used in debug build

GCC 9.2.1 on x86/64 complains about following format string issues:

 urngd.c:94:12: error: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Werror=format=]
 urngd.c:94:12: error: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’} [-Werror=format=]

GCC 7.4.0 on i.mx6 complains about following format string issues:

 urngd.c:55:20: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Werror=format=]

Ref: https://gitlab.com/ynezz/openwrt-urngd/-/jobs/306404059
Ref: https://gitlab.com/ynezz/openwrt-urngd/-/jobs/309187631
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoAdd initial GitLab CI support
Petr Štetiar [Fri, 27 Sep 2019 20:15:04 +0000 (22:15 +0200)]
Add initial GitLab CI support

Uses currently proof-of-concept openwrt-ci[1] in order to:

 * improve the quality of the codebase in various areas
 * decrease code review time and help merging contributions faster
 * get automagic feedback loop on various platforms and tools
   - out of tree build with OpenWrt SDK on following targets:
     * ath79-generic
     * imx6-generic
     * malta-be
     * mvebu-cortexa53
   - out of tree native build on x86/64 with GCC (versions 7, 8, 9) and Clang 9
   - out of tree native x86/64 static code analysis with cppcheck and
     scan-build from Clang 9

1. https://gitlab.com/ynezz/openwrt-ci/

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoFix wrong type in format string
Hauke Mehrtens [Mon, 17 Jun 2019 13:17:52 +0000 (15:17 +0200)]
Fix wrong type in format string

GCC 9.1 complains about this wrong type used in the format string, fix
this to make the compiler happy.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years agoInit logging before actually using it
Petr Štetiar [Mon, 27 May 2019 13:06:31 +0000 (15:06 +0200)]
Init logging before actually using it

Otherwise we don't get urngd: prefixed log messages which might be
confusing:

 procd: - watchdog -
 jent-rng init failed, err: 2
 procd: - watchdog -

While at it add missing newline in one error message.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoInitial commit v1.0.0
Petr Štetiar [Mon, 20 May 2019 09:24:49 +0000 (11:24 +0200)]
Initial commit

Signed-off-by: Petr Štetiar <ynezz@true.cz>